package com.song.elasticsearch.config.redis;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import redis.clients.jedis.JedisCluster;

@Component
public class RedisUtil {
    @Autowired
    private JedisCluster jedisCluster;

    public void set(String key, int seconds, String value){
        jedisCluster.setex(key, seconds, value);
    }

    public String get(String key){
        return jedisCluster.get(key);
    }
}
